<?php

require_once "../dao/corder_dao.php";
require_once "../../app/dao/database.php";

$modul=$_GET['modul'];
$id=$_GET['id'];
$orderstat=$_GET['orderstat'];
$class_db = new Database;

switch($modul){
    
    case "hapus":
    
		//$class_db = new Database;
		
		$order = new Corder_Dao($class_db);
        
     	$order->del($id);
        
        header('location:order_view.php');
            
    break;

	case "update":
	
		$order = new Corder_Dao($class_db);
        
     	$order->update($id,$orderstat);
        
        header('location:order_view.php');
    
        
    }